<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改客户信息录入与分析')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-customer-edit" th:object="${customer}">
            <input name="custometTableId" th:field="*{custometTableId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">姓名：</label>
                <div class="col-sm-8">
                    <input name="custometTableName" th:field="*{custometTableName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电话：</label>
                <div class="col-sm-8">
                    <input name="custometTablePhone" th:field="*{custometTablePhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">预产期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="custometTableExpectedData" th:value="${#dates.format(customer.custometTableExpectedData, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">需求日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="custometTableDamandData" th:value="${#dates.format(customer.custometTableDamandData, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">需求内容：</label>
                <div class="col-sm-8">
                    <input name="custometTableDamand" th:field="*{custometTableDamand}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">等级：</label>
                <div class="col-sm-8">
                    <input name="custometTableLevel" th:field="*{custometTableLevel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户来源：</label>
                <div class="col-sm-8">
                    <input name="custometTableCustomerSource" th:field="*{custometTableCustomerSource}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">育婴顾问：</label>
                <div class="col-sm-8">
                    <input name="custometTableCounterman" th:field="*{custometTableCounterman}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">育婴师：</label>
                <div class="col-sm-8">
                    <input name="custometTableNursery" th:field="*{custometTableNursery}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/customer";
        $("#form-customer-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-customer-edit').serialize());
            }
        }

        $("input[name='custometTableExpectedData']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='custometTableDamandData']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>